package com.example.skin_whitening_ndk;

import android.graphics.Bitmap;
import android.graphics.Color;

/**
 * Created by jiang at 2021/9/28
 */
public class JavaImagePixel {
    public static Bitmap getImageBitmap(Bitmap src){
        int width=src.getWidth();
        int height=src.getHeight();
        Bitmap dst=Bitmap.createBitmap(width,height, Bitmap.Config.ARGB_8888);

        int alpha,red,green,blue;

        int Pixel_color;
        //依次拿到每一个像素点
        for (int x=0;x<width;x++){
            for (int y=0;y<height;y++){
                Pixel_color= src.getPixel(x,y);
                dst.setPixel(x,y,Pixel_color);
            }
        }
        return dst;
    }
}
